//加载wifi sta模式配置数据
boolean  loadWifiStaJsonConf() {
  Serial.println("开始加载配置数据：" + CONF_WIFI_FILE_NAME);
  String jsonconf = loadFile(CONF_WIFI_FILE_NAME);
  if (jsonconf == "")
  {
    Serial.println("配置数据为空");
    return false;
  }
  Serial.println("获取配置数据:" + jsonconf);
  StaticJsonDocument<256> doc;
  deserializeJson(doc, jsonconf);
  Serial.print ("WIFI_STA_SID_KEY:");
  String sid = doc[WIFI_STA_SID_KEY];
  if (sid == "" || sid == "null")
  {
    doc.clear();
    return false;
  }
  WIFI_STA_SID_VAL = sid;
  Serial.print (WIFI_STA_SID_VAL);
  Serial.print ("      ");
  Serial.print ("STA_SID_PASS_KEY:");
  String sidpass = doc[WIFI_STA_SID_PASS_KEY];
  WIFI_STA_SID_PASS_VAL = sidpass;
  Serial.println (WIFI_STA_SID_PASS_VAL);


  //  WATHER_KEY =
  String wk = doc["WATHER_KEY"];
  WATHER_KEY = wk;
  String wl = doc["WATHER_LOCATION"];
  if (wl == "" || wl == "null")
  {
    wl = "beijing";
  }
  WATHER_LOCATION = wl;
  doc.clear();
  return true;
}

//保存 stat模式配置数据
boolean  saveWifiStaJsonConf()
{
  StaticJsonDocument<256> doc;
  doc[WIFI_STA_SID_KEY] = WIFI_STA_SID_VAL;
  doc[WIFI_STA_SID_PASS_KEY] = WIFI_STA_SID_PASS_VAL;
  doc["WATHER_KEY"] = WATHER_KEY;
  doc["WATHER_LOCATION"] = WATHER_LOCATION;
  String wificonf;
  serializeJson(doc, wificonf);
  Serial.println ("[SAVE SETTING]>>" + wificonf);
  writesave(CONF_WIFI_FILE_NAME, wificonf);
  doc.clear();
  return true;
}
